import 'package:flutter/material.dart';
import 'package:wechat/common/touch_callback.dart';

import '../common/wechat_item.dart';

class Personal extends StatefulWidget {
  const Personal({super.key});

  @override
  State<Personal> createState() => _PersonalState();
}

class _PersonalState extends State<Personal> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: ListView(
        children: [
          Container(
            margin: const EdgeInsets.only(top: 20),
            color: Colors.white,
            height: 80,
            child: TouchCallback(
              child: Row(
                crossAxisAlignment: CrossAxisAlignment.center,
                children: [
                  Padding(
                    padding: const EdgeInsets.only(left: 20, right: 20),
                    child: Image.network(
                      "https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fb-ssl.duitang.com%2Fuploads%2Fitem%2F201812%2F18%2F20181218203335_xdwvq.jpg&refer=http%3A%2F%2Fb-ssl.duitang.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1719559683&t=9e9f75647b6c8b43657e66db0fb22461",
                      width: 64,
                      height: 64,
                      fit: BoxFit.cover,
                    ),
                  ),
                  const Expanded(
                    child: Column(
                      mainAxisAlignment: MainAxisAlignment.center,
                      crossAxisAlignment: CrossAxisAlignment.start,
                      children: [
                        Text(
                          "图图",
                          style: TextStyle(fontSize: 18, color: Colors.black),
                        ),
                        Text(
                          "微信号: tutu",
                          style:
                              TextStyle(fontSize: 14, color: Color(0xFF999999)),
                        ),
                      ],
                    ),
                  ),
                  Container(
                    margin: const EdgeInsets.only(right: 20),
                    child: Image.asset(
                      "images/code.png",
                      width: 32,
                      height: 32,
                      fit: BoxFit.contain,
                    ),
                  ),
                ],
              ),
              onPress: () {},
            ),
          ),
          Container(
            margin: const EdgeInsets.only(top: 20),
            color: Colors.white,
            child: const WeChatItem(
              title: "钱包",
              imagePath: 'images/icon_me_money.png',
            ),
          ),
          Container(
            margin: const EdgeInsets.only(top: 20),
            color: Colors.white,
            child: const Column(
              children: [
                WeChatItem(
                  title: "收藏",
                  imagePath: 'images/icon_me_collect.png',
                ),
                Padding(
                  padding: EdgeInsets.only(left: 15, right: 15),
                  child: Divider(
                    height: 0.5,
                    color: Color(0xFFdddddd),
                  ),
                ),
                WeChatItem(
                  title: "相册",
                  imagePath: 'images/icon_me_photo.png',
                ),
                Padding(
                  padding: EdgeInsets.only(left: 15, right: 15),
                  child: Divider(
                    height: 0.5,
                    color: Color(0xFFdddddd),
                  ),
                ),
                WeChatItem(
                  title: "卡包",
                  imagePath: 'images/icon_me_card.png',
                ),
                Padding(
                  padding: EdgeInsets.only(left: 15, right: 15),
                  child: Divider(
                    height: 0.5,
                    color: Color(0xFFdddddd),
                  ),
                ),
                WeChatItem(
                  title: "表情",
                  imagePath: 'images/icon_me_smile.png',
                ),
              ],
            ),
          ),
          Container(
            margin: const EdgeInsets.only(top: 20),
            color: Colors.white,
            child: const WeChatItem(
              title: "设置",
              imagePath: 'images/icon_me_setting.png',
            ),
          ),
        ],
      ),
    );
  }
}
